package com.group56.view.coachend;

import com.group56.factory.AppCMFactory;
import com.group56.factory.CoachAppCMFactory;
import com.group56.mediator.CoachAppCtrlrMediator;
import com.group56.utils.FXMLSrcMenu;
import com.group56.utils.FXMLViewHandler;
import com.group56.view.FrameworkController;
import com.group56.view.ViewController;
import javafx.event.ActionEvent;
import javafx.scene.Parent;
import javafx.scene.control.Button;

import java.io.IOException;

public class CoachNavController implements ViewController {
    public Button video_button;
    public Button coach_schedule_button;
    public Button info_button;

    @Override
    public void registerToMediator() {
        CoachAppCMFactory.getCtrlrMediator().registerController(FXMLSrcMenu.CoachEnd.NAVIGATOR.getSrc(),this);
    }

    @Override
    public Parent getView() {
        return null;
    }

    public void clickVideoBtn(ActionEvent actionEvent) {
    }

    public void clickScheduleBtn(ActionEvent actionEvent) throws IOException {
        FrameworkController appFramework = (FrameworkController) CoachAppCMFactory.getCtrlrMediator().getController(FXMLSrcMenu.CoachEnd.APP_FRAMEWORK.getSrc());
        FXMLViewHandler.putViewInPane(appFramework.getContentPane(), FXMLSrcMenu.CoachEnd.SCHEDULE.getSrc());
    }

    public void clickInfoBtn(ActionEvent actionEvent) throws IOException {
        FrameworkController appFramework = (FrameworkController) CoachAppCMFactory.getCtrlrMediator().getController(FXMLSrcMenu.CoachEnd.APP_FRAMEWORK.getSrc());
        FXMLViewHandler.putViewInPane(appFramework.getContentPane(), FXMLSrcMenu.CoachEnd.COACH_INFO.getSrc());
    }
}
